package arithmetic;

import java.util.Scanner;

/**
 * @program: javaLearn
 * @description: 邻域均值
 * @author: renhai
 * @Date ：2022/3/8 22:46
 **/
public class Q202104_2 {
    /***
     * 两种求前缀和的方法
     *
     * idea1
     * for(int i=1;i<=n;i++)
     *     for(int j=1;j<=m;j++)
     *         cin>>a[i][j];
     *
     * int sum[]={0};
     * for(int i=1;i<=n;i++)
     *     for(int j=1;j<=m;j++)
     *         sum[i][j]=sum[i][j-1]+sum[i-1][j]-sum[i-1][j-1]+a[i][j];
     *
     *
     *idea2
     * for(int i=1;i<=n;i++)
     *     for(int j=1;j<=m;j++)
     *         cin>>a[i][j];
     *
     * for(int i=1;i<=n;i++)
     *     for(int j=1;j<=m;j++)
     *         a[i][j]=a[i][j-1]+a[i-1][j]-a[i-1][j-1]+a[i][j];
     */
    public static void main(String[] args) {
        int n, L, r, t;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        L = scanner.nextInt();
        r = scanner.nextInt();
        t = scanner.nextInt();
        int[][] A = new int[601][601];
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++) {
                A[i][j] = scanner.nextInt();
            }
        }

        int[][] sums = new int[601][601];
        for (int i = 1; i <= n; i++)
            for (int j = 1; j <= n; j++) {
                sums[i][j] = sums[i - 1][j] + sums[i][j - 1] - sums[i - 1][j - 1] + A[i][j];
            }

        double sum = 0;
        double avg = 0.0;
        int Xl, Xr, Yl, Yr, count, count2 = 0;
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++) {
                Xl = Math.max(i - r - 1, 0);
                Xr = Math.min(i + r, n);
                Yl = Math.max(j - r - 1, 0);
                Yr = Math.min(j + r, n);
                count = (Xr - Xl) * (Yr - Yl);
//                for (int k = Xl; k <= Xr; k++) {
//                    for (int l = Yl; l <= Yr; l++) {
//                        sum = sum + A[k][l];
//                    }
//                }
                avg = (sums[Xr][Yr] - sums[Xl][Yr] - sums[Xr][Yl] + sums[Xl][Yl]) / (1.0 * count);
                if (avg <= t) {
                    count2++;
                }
            }
        }
        System.out.println(count2);
    }
}
